package priv.abadstring.study.rocketmq.spring;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * Consumer
 *
 * @author aBadString
 * @date 2021-08-04 19:41:15
 */
@Component
@RocketMQMessageListener(topic = "hello", consumerGroup = "haoke", selectorExpression = "*")
public class Consumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("[收到消息] " + message);
    }
}
